﻿/*----------------------------------------------------------------
//文件名：Config.cs
//文件功能描述：本类负责加载一些公共的配置信息；。
//创建人：赵国伟
//创建时间：2011-09-03 13:49:54
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Shopping.Common
{
    public class Config
    {
        /// <summary>
        /// 商城文件存放地址目录；
        /// </summary>
        public static readonly string ShoppingFolder = ConfigurationManager.AppSettings["ShoppingFolder"] as string;

        /// <summary>
        /// 商城文件访问Url;
        /// </summary>
        public static readonly string ShoppingFolderUrl = ConfigurationManager.AppSettings["ShoppingFolderUrl"] as string;

        /// <summary>
        /// 商城名称；
        /// </summary>
        public static readonly string ShoppingName = ConfigurationManager.AppSettings["ShoppingName"] as string;

        /// <summary>
        /// 商城简称
        /// </summary>
        public static readonly string ShoppingShortName = ConfigurationManager.AppSettings["ShoppingShortName"] as string;

        /// <summary>
        /// 商城域名；
        /// </summary>
        public static readonly string SiteUrl = ConfigurationManager.AppSettings["SiteUrl"] as string;

        /// <summary>
        /// 商品图片中图宽度；
        /// </summary>
        public static readonly int MiddlePicture_Width = Utility.Cast2int(ConfigurationManager.AppSettings["MiddlePicture_Width"]);

        /// <summary>
        /// 商品图片中图高度；
        /// </summary>
        public static readonly int MiddlePicture_Height = Utility.Cast2int(ConfigurationManager.AppSettings["MiddlePicture_Height"]);

        /// <summary>
        /// 商品图片小图宽度；
        /// </summary>
        public static readonly int SmallPicture_Width = Utility.Cast2int(ConfigurationManager.AppSettings["SmallPicture_Width"]);

        /// <summary>
        /// 商品图片小图高度；
        /// </summary>
        public static readonly int SmallPicture_Height = Utility.Cast2int(ConfigurationManager.AppSettings["SmallPicture_Height"]);

        /// <summary>
        /// 商品图片小图宽度；
        /// </summary>
        public static readonly int SuperSmallPicture_Width = Utility.Cast2int(ConfigurationManager.AppSettings["SuperSmallPicture_Width"]);

        /// <summary>
        /// 商品图片小图高度；
        /// </summary>
        public static readonly int SuperSmallPicture_Height = Utility.Cast2int(ConfigurationManager.AppSettings["SuperSmallPicture_Height"]);


        /// <summary>
        /// 系统版本号；
        /// </summary>
        public static readonly string Version = "1.0";

        /// <summary>
        /// 模板文件地址；
        /// </summary>
        public static readonly string Template_Folder = ConfigurationManager.AppSettings["Template_Folder"] as string;

        /// <summary>
        /// 自动生成文件存放地址；
        /// </summary>
        public static readonly string AutoGenerate_Folder = ConfigurationManager.AppSettings["AutoGenerate_Folder"] as string;

        /// <summary>
        /// 是否执行URL重写。
        /// </summary>
        public static bool IsRewrite = Utility.Cast2bool(ConfigurationManager.AppSettings["IsRewrite"] );

        /// <summary>
        /// 频道页面；
        /// </summary>
        public static string GoodsChannelUrl = ConfigurationManager.AppSettings["GoodsChannelUrl"] as string;

        /// <summary>
        /// 商品列表页地址；
        /// </summary>
        public static string GoodsListUrl = ConfigurationManager.AppSettings["GoodsListUrl"] as string;

        /// <summary>
        /// 商品最终页地址；
        /// </summary>
        public static string GoodsShowUrl = ConfigurationManager.AppSettings["GoodsShowUrl"] as string;

        /// <summary>
        /// 新闻最终页地址；
        /// </summary>
        public static string NewsShowUrl = ConfigurationManager.AppSettings["NewsShowUrl"] as string;


        /// <summary>
        /// 点客123内部会员账号ID；
        /// </summary>
        public static int DianKe123_UserID = Utility.Cast2int(ConfigurationManager.AppSettings["DianKe123_UserID"]);

        /// <summary>
        /// 支付宝Key
        /// </summary>
        public static string Alipay_Key = ConfigurationManager.AppSettings["AlipayKey"] as string;

        /// <summary>
        /// 支付宝合作ID
        /// </summary>
        public static string Alipay_PatternID = ConfigurationManager.AppSettings["AlipayPattern"] as string;

        /// <summary>
        /// 支付宝收款账号；
        /// </summary>
        public static string Alipay_SellerMail = ConfigurationManager.AppSettings["SellerMail"] as string;

        /// <summary>
        /// 支付宝返回地址；
        /// </summary>
        public static string Alipay_ReturnUrl = ConfigurationManager.AppSettings["AlipayReturnUrl"] as string;

        /// <summary>
        /// 支付宝通知地址；
        /// </summary>
        public static string Alipay_NotifyUrl = ConfigurationManager.AppSettings["AlipayNotifyUrl"] as string;


    }
}
